With rapid development of Internet technologies, the Internet has more and more webpage contents. The increase of webpage contents on the Internet requires a higher development efficiency for web developers. At present, one webpage basically includes three parts, head, body and tail. It can be understood that a webpage resource corresponding to the webpage is also divided into three parts: a head resource, a body resource and a tail resource. The body is a major part of the webpage, and it is mainly developed by technical staff.
In order to increase the efficiency of developing a webpage body, a technical measure generally employed in the industry is modularizing the body, that is, the body is divided into multiple modules, for example, a weather module, a search module, a music module and the like on the webpage. The modularization enables each technical staff to take charge of one module alone, thereby improving the efficiency of developing the body, and causes one body to have one or more modules thereon. In the case that the body includes multiple modules, it can be understood that the body resource corresponding to the body also includes module resources of respective modules.
In an actual application, a browser may load a webpage resource sent by a server, thus displaying webpage content. At present, the browser may load the webpage resource in a top-down manner; that is, the head resource of the webpage resource is loaded at first, then the body resource of the webpage resource is loaded, and finally the tail resource of the webpage resource is loaded. In the process of loading the body resource, a top-down loading manner is still employed, resources sorted in the top are loaded at first and then resources sorted in the bottom are loaded, until loading of all the body resources are completed.
When loading a module resource in the body resources, the browser may load three types of files included in the module resource: an independent function template file, a Cascading Style Sheets (CSS) file and a JavaScript (JS) file; after loading of the three types of files have been completed, other body resources after the module resource are further loaded.
However, in one module resource, after loading of the independent function template file and the CSS file are completed, webpage content corresponding to the module resource can be displayed; while running the JS file merely improves the function that can be implemented by the module. That is, whether execution of the JS file of each module resource is completed is irrelevant to display of webpage content, and the JS file of each module resource is run at a lower speed; this results in that, only by spending resources and time in executing the JS file of each module resource at first, can the browser display the webpage content, that is, the JS file of each module resource may hinder rendering of the webpage content.
In terms of a first screen page of a webpage, display efficiency of the first screen page is the most important, that is, the browser can rapidly display all content of the webpage. However, in the light of the current manner of a browser to load a webpage resource, only by spending a longer time can the browser display a first screen page of a webpage, which reduces the display efficiency of the first screen page.
Therefore, a webpage loading manner is required now to improve the display efficiency of the first screen page of the webpage.